package com.hyou.sc.zuul.config.web;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import com.hyou.sc.zuul.consts.ProfileConst;
import com.hyou.sc.zuul.filter.pre.WebPreAuthFilter;

/**
 * 适用于WEB请求的Bean配置
 * 
 * @author FengChangshuo
 * @version 1.0.0 2018-04-19 17:26:08 初始创建
 */
@Profile(ProfileConst.WEB)
@Configuration
public class ApplicationZuulWebProfileConfig {
    
    @Bean
    @ConfigurationProperties(value = "hyou.zuul.filter.web")
    public WebFilterProp webFilterProp() {
        return new WebFilterProp();
    }
    
    /**
     * <pre>
     * 前置过滤器
     * 
     * 版本修改历史记录：
     * 1) 1.0.0 2018-04-19 17:25:48 FengChangshuo 初始创建
     * </pre>
     * 
     * @return WebPreAuthFilter
     */
    @Bean
    public WebPreAuthFilter webPreAuthFilter() {
        return new WebPreAuthFilter();
    }
    
}
